package
{
	import flash.display.MovieClip;
	
	public class InnerDisplay extends MovieClip
	{
		
		private var type:String;
		private var typeNum:int;
		
		public function InnerDisplay(elevator:Elevator,pContainer:MovieClip,x:int,y:int,type:String)
		{
			reSet(x,y);
			switch(type)
			{
				case "up": 
					this.gotoAndStop(1);
					typeNum=1;
					break;
				case "down":
					this.gotoAndStop(2);
					typeNum=2;
					break;
				case "close":
					this.gotoAndStop(3);
					typeNum=3;
					break;
				case "open":
					this.gotoAndStop(4);
					typeNum=4;
					break;
			}
			this.type=type;
			pContainer.addChild(this);
		}
		
		public function reSet(x:int,y:int):void
		{
			this.x=x;
			this.y=y;
		}
		public function setTrue():void
		{
			this.gotoAndStop(typeNum+4);
		}
		public function setFalse():void
		{
			this.gotoAndStop(typeNum);
		}
	}
}